/*
 Navicat Premium Data Transfer

 Source Server         : sql server
 Source Server Type    : SQL Server
 Source Server Version : 16001135 (16.00.1135)
 Source Catalog        : Graduate Admission System
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001135 (16.00.1135)
 File Encoding         : 65001

 Date: 06/12/2024 21:50:37
*/


-- ----------------------------
-- Table structure for django_admin_log
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[django_admin_log]') AND type IN ('U'))
	DROP TABLE [dbo].[django_admin_log]
GO

CREATE TABLE [dbo].[django_admin_log] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [action_time] datetimeoffset(7)  NOT NULL,
  [object_id] nvarchar(max) COLLATE Chinese_PRC_CI_AS  NULL,
  [object_repr] nvarchar(200) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [action_flag] smallint  NOT NULL,
  [change_message] nvarchar(max) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [content_type_id] int  NULL,
  [user_id] int  NOT NULL
)
GO

ALTER TABLE [dbo].[django_admin_log] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of django_admin_log
-- ----------------------------
SET IDENTITY_INSERT [dbo].[django_admin_log] ON
GO

SET IDENTITY_INSERT [dbo].[django_admin_log] OFF
GO


-- ----------------------------
-- Auto increment value for django_admin_log
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[django_admin_log]', RESEED, 1)
GO


-- ----------------------------
-- Indexes structure for table django_admin_log
-- ----------------------------
CREATE NONCLUSTERED INDEX [django_admin_log_content_type_id_c4bce8eb]
ON [dbo].[django_admin_log] (
  [content_type_id] ASC
)
GO

CREATE NONCLUSTERED INDEX [django_admin_log_user_id_c564eba6]
ON [dbo].[django_admin_log] (
  [user_id] ASC
)
GO


-- ----------------------------
-- Checks structure for table django_admin_log
-- ----------------------------
ALTER TABLE [dbo].[django_admin_log] ADD CONSTRAINT [django_admin_log_action_flag_a8637d59_check] CHECK ([action_flag]>=(0))
GO


-- ----------------------------
-- Primary Key structure for table django_admin_log
-- ----------------------------
ALTER TABLE [dbo].[django_admin_log] ADD CONSTRAINT [PK__django_a__3213E83F14562E27] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Foreign Keys structure for table django_admin_log
-- ----------------------------
ALTER TABLE [dbo].[django_admin_log] ADD CONSTRAINT [django_admin_log_content_type_id_c4bce8eb_fk_django_content_type_id] FOREIGN KEY ([content_type_id]) REFERENCES [dbo].[django_content_type] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

ALTER TABLE [dbo].[django_admin_log] ADD CONSTRAINT [django_admin_log_user_id_c564eba6_fk_auth_user_id] FOREIGN KEY ([user_id]) REFERENCES [dbo].[auth_user] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO

